package com.yuan.config;


import com.yuan.pojo.Student;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

@Configuration
public class SpringConfig {



    @Bean(value = "student1",initMethod = "initStudent",destroyMethod = "destroyStudent")
//    @Scope(scopeName = "prototype")
    @Scope(scopeName = "singleton")
    public Student getStudent1(){
        return new Student();
    }

}
